using System;


namespace SharpTalk.Core.Data.SqLiteDataProvider
{
    public static class Extensions
    {
        /// <summary>
        /// Throws an <see cref="ObjectDisposedException"/> if the object is disposed.
        /// </summary>
        public static void ThrowIfDisposed<T>(this SqLiteDataProviderBase<T> dataProviderBase)
        {
            if(dataProviderBase.Disposed)
                throw new ObjectDisposedException("dataprovider");
        }
        
    }
}